<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title)">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title th:replace="${title}"></title>
    <link rel="shortcut icon" th:href="@{/imgs/favicon.ico}" type="image/x-icon" />

    <link rel="stylesheet" th:href="@{/layui/css/layui.css}"><!--layui框架-->
    <script type="text/javascript" th:src="@{/layui/layui.js}"></script>
    <link rel="stylesheet" th:href="@{/layui-formSelects/formSelects-v4.css}"/>

    <link rel="stylesheet" th:href="@{/css/style.css}">
    <script type="text/javascript" th:src="@{/js/style.js}"></script>

    <link th:href="@{/font-awesome/css/font-awesome.min.css}" rel="stylesheet" type="text/css" />
    <script type="text/javascript" th:src="@{/js/base64.min.js}"></script>
<!--    <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/js-base64@3.6.0/base64.min.js"></script>-->
    <script type="text/javascript" src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>
<body>
<!-- 导航 -->
<nav class="layui-bg-black layui-header" th:fragment="menu(n)">
    <div class="layui-container">

    </div>
</nav>
<!-- 弹出层中的表单模板 -->
<form id="depaEditForm" class="layui-form" th:action="@{/add/depa}" method="post" th:fragment="formTemplate" style="display: none">
    <input type="hidden" name="depaId" id="depaId">
    <div class="layui-form-item">
        <label class="layui-form-label">部门名称</label>
        <div class="layui-input-inline">
            <input type="text" name="depaName" id="depaName" required placeholder="请输入名称" autocomplete="off"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">部门描述</label>
        <div class="layui-input-inline">
            <input type="text" name="minister" id="minister" required lay-verify="required" placeholder="描述部门情况"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
        </div>
    </div>
</form>

<form id="workEditForm" class="layui-form" th:action="@{/work/add}" method="post" th:fragment="workTemplate" style="display: none;padding-right: 20px">
    <input type="hidden" name="workId" id="workId">
    <input type="hidden" name="meName" id="meName">
    <div class="layui-form-item">
        <label class="layui-form-label">计划名称</label>
        <div class="layui-input-block">
            <input type="text" name="workName" id="workName" required  placeholder="请输入名称" autocomplete="off"
                   class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">计划内容</label>
        <div class="layui-input-block">
            <textarea type="text" name="workText" id="workText" required class="layui-input" style="height: 150px">
            </textarea>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
        </div>
    </div>
</form>

<form id="itemEditForm" class="layui-form" method="post"  th:fragment="itemTemplate" style="display:none;">
    <input type="hidden" name="itemId" id="itemId" value="">
    <div class="layui-form-item">
        <label class="layui-form-label">物品名称</label>
        <div  class="layui-input-inline">
            <input type="text" name="itemName" id="itemName" required placeholder="物品名称" autocomplete="off" class="layui-input">
        </div>
    </div>
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">购买时间</label>-->
<!--        <div  class="layui-input-inline">-->
<!--            <input type="text" class="layui-input" id="purchaseDate" name="purchaseDate" placeholder="购买时间" autocomplete="off">-->
<!--        </div>-->
<!--    </div>-->
    <div class="layui-form-item">
        <label class="layui-form-label">单价</label>
        <div  class="layui-input-inline">
            <input type="text"name="price" required id="price" placeholder="单价" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">数量</label>
        <div  class="layui-input-inline">
            <input type="text" name="itemNumber" required id="itemNumber" placeholder="数量" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">物品描述</label>
        <div  class="layui-input-inline">
            <input type="text" name="itemDescribe" id="itemDescribe" placeholder="描述" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
        </div>
    </div>
</form>

<form id="recordEditForm"  th:fragment="recordTemplate" class="layui-form" lay-filter="recordForm" method="post" action="/record/add" style="display:none;">
<!--    <div th:fragment="recordInfo">-->
        <input type="hidden" name="recordId" id="recordId" value="">
        <div class="layui-form-item">
            <label class="layui-form-label">物品</label>
            <div  class="layui-input-inline" >
                <select name="itemName" id="itemName" required lay-search>
                    <option value="" selected="">请选择</option>
                    <option th:each="itemMap : ${itemNames}" th:value="${itemMap.get('item_id')}" th:text="${itemMap.get('item_name')}" ></option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">部门</label>
            <div  class="layui-input-inline" >
                <select name="department" id="department" required lay-search lay-filter="recordDepa">
                    <option value="" selected="">请选择</option>
                    <option th:each="map : ${departments}" th:value="${map.get('depaId')}" th:text="${map.get('depaName')}">1</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">借物人</label>
            <div  class="layui-input-inline">
                <select name="meName" id="recordMeName" required lay-search>
                    <option value="">请选择</option>
                </select>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">数量</label>
            <div  class="layui-input-inline">
                <input type="text" name="number" id="number" required placeholder="数量" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
            </div>
        </div>
<!--    </div>-->
</form>

<form action="" th:fragment="funTemplate"  id="funAddForm" class="layui-form" method="post" style="display:none;padding-top:10px;">
    <div class="layui-form-item">
        <label class="layui-form-label">功能名称</label>
        <div class="layui-input-inline">
            <input type="hidden" name="funId" id="fid" value="" />
            <input type="text" name="funName" id="funName" required  lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input layui-input-inline">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">功能类别</label>
        <div  class="layui-input-inline">
            <input type="radio" name="funType" id="funType1" value="1" title="菜单" checked>
            <input type="radio" name="funType" id="funType2" value="0" title="按钮">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">URL</label>
        <div  class="layui-input-inline">
            <input type="text" name="funHref" id="funHref" required  placeholder="请输入链接" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">功能标识</label>
        <div  class="layui-input-inline">
            <input type="text" name="funAuth" id="funAuth" required  placeholder="请输入功能范围" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">所属父级</label>
        <div  class="layui-input-inline">
            <input type="hidden" name="pid" id="pid" value="-1" />
            <input type="text" name="pname" id="pname" readonly  autocomplete="off" class="layui-input" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
        </div>
    </div>

</form>
<div th:fragment="roleTemplate">
    <form id="roleEditForm" class="layui-form" action="" method="post" style="display:none;">
        <input type="hidden" name="roleId" id="roleId" value="">
        <div class="layui-form-item">
            <label class="layui-form-label">角色名称</label>
            <div  class="layui-input-inline">
                <input type="text" name="roleName" id="roleName" required lay-verify="required" placeholder="请输入名称" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">角色描述</label>
            <div  class="layui-input-inline">
                <input type="text" name="description" id="description" required  lay-verify="required" placeholder="请输入描述" autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
            </div>
        </div>
    </form>
    <div class="layui-card"  id="setFun" style="display:none;">
        <div class="layui-card-header" style="padding: 10px;text-align: center">
            角色编号：<input class="layui-input layui-input-inline" id="set_roleId" name="set_rid" style="width:150px;" disabled/>
            角色名称：<input class="layui-input layui-input-inline" id="set_roleName" name="set_rname" style="width:150px;" disabled />
        </div>
        <div class="layui-card-body">
            <!-- layui-treetable组件装载数据 -->
            <div id="funGrid"></div>
        </div>
    </div>
</div>

<div class="m-auto message" th:fragment="msgTemplate" style="display:none; padding-right: 10px;margin: 0 auto;width: 450px;">
    <form id="msgEditForm" class="layui-form" method="post" th:action="@{/message/add}" >
        <input type="hidden" name="messageId" id="messageId" value="">
        <div class="layui-form-item">
            <label class="layui-form-label">标题</label>
            <div  class="layui-input-block">
                <input type="text" name="messageTitle" id="messageTitle" required placeholder="标题" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">收信人</label>
            <div  class="layui-input-block">
                <input type="radio" name="scope" value="-1"  title="所有" shiro:hasAnyRoles="admin">
                <input type="radio" name="scope" value="0"  title="主席" checked shiro:hasAnyRoles="admin">
                <input type="radio" name="scope" value="1" title="副主席" shiro:hasAnyRoles="admin">
                <input type="radio" name="scope" value="2" title="部长" shiro:hasAnyRoles="admin">

                <input type="radio" name="scope" value="1" title="副主席" checked shiro:hasAnyRoles="chairman">
                <input type="radio" name="scope" value="2" title="部长" shiro:hasAnyRoles="chairman">

                <input type="radio" name="scope" value="2" title="部长" checked shiro:hasAnyRoles="vice-chairman">

                <input type="radio" name="scope" value="3" title="部门" checked shiro:hasAnyRoles="minister">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">内容</label>
            <div  class="layui-input-block">
                <textarea name="messageText" id="messageText" required placeholder="请输入内容" class="layui-textarea"></textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button id="msgbtn" class="layui-btn" lay-submit lay-filter="formDemo">发送</button>
                <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
            </div>
        </div>
    </form>
</div>


<form id="memberAddForm" class="layui-form" th:action="@{/departmentsInfo/add}" method="post" lay-filter="memberAddForm"  th:fragment="memberAddTemplate" style="display:none;">
    <div class="layui-form-item">
        <label class="layui-form-label">学号</label>
        <div  class="layui-input-inline">
            <input type="text" name="meId" required placeholder="学号" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div  class="layui-input-inline">
            <input type="text" name="meName" required placeholder="姓名" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div  class="layui-input-inline">
            <input type="radio" name="sex" value="男" title="男" checked>
            <input type="radio" name="sex" value="女" title="女">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">院系</label>
        <div  class="layui-input-inline">
            <select name="faculty" id="info_faculty" required lay-search lay-filter="info_faculty">
                <option value="" selected="">请选择</option>
                <option ></option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">专业</label>
        <div  class="layui-input-inline">
            <select name="major" id="info_major" required lay-search >
                <option value="" selected="">请选择</option>
                <option >1</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">班级</label>
        <div  class="layui-input-inline">
            <input type="text" name="grade" required placeholder="班级" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
            <button type="button" class="layui-btn layui-btn-primary" onclick="closeEditWin()">取消</button>
        </div>
    </div>
</form>


<!-- 尾部 -->
<footer class="layui-bg-black m-padded-tb" th:fragment="footer">
    <div class="layui-container">
        <div class="layui-row">

        </div>
        <hr>
    </div>
</footer>
</body>
</html>
